a68b3c29c0a9592fef7bbcf0a86ec50bdbfd40ad,opennms-services/src/main/java/org/opennms/netmgt/linkd/snmp/IpNetToMediaTableEntry.java,IpNetToMediaTableEntry,getIpNetToMediaPhysAddress,#,155
Before Change
// This is the normal case that most agents conform to: the value is an ASCII
// string representing the colon-separated MAC address. We just need to reformat
// it to remove the colons and convert it into a 12-character string.
return normalizeMacAddress(getDisplayString(IpNetToMediaTableEntry.INTM_PHYSADDR));
}
} catch (IllegalArgumentException e) {
LOG.warn("IllegalArgumentException", e);
After Change
// This is the normal case that most agents conform to: the value is an ASCII
// string representing the colon-separated MAC address. We just need to reformat
// it to remove the colons and convert it into a 12-character string.
String mac = getValue(IpNetToMediaTableEntry.INTM_PHYSADDR).toDisplayString();
return mac == null || mac.trim().isEmpty() ? null : normalizeMacAddress(mac);
}
} catch (IllegalArgumentException e) {
LOG.warn("IllegalArgumentException", e);